package com.workcell.workdata.xthings.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.workcell.workdata.xthings.constant.ExtOutputAttributes;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @TableName t_code_serial_device
 */
@TableName(value = "t_code_serial_device")
@Data
@Accessors(chain = true)
public class CodeSerialDevice implements Serializable {

    @TableId
    @ApiModelProperty(value = "二维码信息ID")
    private String codeId;

    @ApiModelProperty(value = "功率计型号ID")
    private String dtId;

    @ApiModelProperty(value = "厂家设备编号")
    private String deviceNo;

    @ApiModelProperty(value = "短链码")
    private String chainNum;

    @ExtOutputAttributes(key = "设备名称")
    @ApiModelProperty(value = "设备名称")
    private String dtName;

    @ExtOutputAttributes(key = "厂商名称")
    @ApiModelProperty(value = "厂商名称")
    private String manufacturer;

    @ExtOutputAttributes(key = "产品类型")
    @ApiModelProperty(value = "产品类型")
    private String dcProductType;

    @ExtOutputAttributes(key = "型号")
    @ApiModelProperty(value = "型号")
    private String dcModel;

    @ExtOutputAttributes(key = "通讯方式")
    @ApiModelProperty(value = "通讯方式")
    private String dcCommunicationMode;

    @ApiModelProperty("MAC地址")
    private String macAddress;

    @ApiModelProperty("cron表达式")
    private String cronExpression;

    @ApiModelProperty("状态")
    private String state;

	@ApiModelProperty(value = "波特率")
	private Integer baudRate;

    @ApiModelProperty(value = "工作模式：0-无，1-TCP/UDP透传，2-HTTP传输，3-阿里云 MQTT，4-ONENET MQTT，5-阿里云 MQTT，4-百度云 MQTT，5-标准 MQTT")
    private String workingMode;

    @ApiModelProperty(value = "发布主题：有线串口-Xthings/PowerMeter/{设备编码}/wd/post，4G串口-Xthings/SerialDevice4G/{设备编码}/wd/post")
    private String publishTopic;

    @ApiModelProperty(value = "订阅主题：有线串口-Xthings/PowerMeter/{设备编码}/wd/post_reply，4G串口-Xthings/SerialDevice4G/{设备编码}/wd/post_reply")
    private String subscribeTopic;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty("创建人")
    private String createBy;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty("更新人")
    private String updateBy;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty("更新时间")
    private LocalDateTime updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}
